import type {RouteRecordRaw} from "vue-router"

const routes: RouteRecordRaw[] = [
    {
        path: "/login",
        name: "Login",
        component: () => import("@views/login/index.vue"),
        meta: {
            isVisible: false
        }
    },
    {
        path: "/404",
        name: "404",
        component: () => import("@views/404/index.vue"),
        meta: {
            isVisible: false
        }
    },
    {
        path: "/",
        redirect: "/home",
        component: () => import("@/layout/index.vue"),
        meta: {
            isVisible: true
        },
        children: [
            {
                path: "/home",
                name: "Home",
                component: () => import("@views/home/index.vue"),
                meta: {
                    isVisible: true,
                    title: "首页",
                    icon: "House"
                }
            },
            {
                path: "/clazz",
                name: "Clazz",
                meta: {
                    isVisible: true,
                    title: "班级学员管理",
                    icon: "User"
                },
                children: [
                    {
                        path: "/clazz/classes",
                        name: "Classes",
                        component: () => import("@views/clazz/classes/index.vue"),
                        meta: {
                            isVisible: true,
                            title: "班级管理",
                            icon: "Collection"
                        }
                    },
                    {
                        path: "/clazz/student",
                        name: "Student",
                        component: () => import("@views/clazz/classes/index.vue"),
                        meta: {
                            isVisible: true,
                            title: "学员管理",
                            icon: "UserFilled"
                        }
                    }
                ]
            },
            {
                path: "/system",
                name: "System",
                meta: {
                    isVisible: true,
                    title: "系统信息管理",
                    icon: "Setting"
                },
                children: [
                    {
                        path: "/system/dept",
                        name: "dept",
                        component: () => import("@views/system/dept/index.vue"),
                        meta: {
                            isVisible: true,
                            title: "部门管理",
                            icon: "OfficeBuilding"
                        }
                    },
                    {
                        path: "/system/emp",
                        name: "Emp",
                        component: () => import("@views/system/emp/index.vue"),
                        meta: {
                            isVisible: true,
                            title: "学员管理",
                            icon: "User"
                        }
                    }
                ]
            },
            {
                path: "/data",
                name: "Data",
                meta: {
                    isVisible: true,
                    title: "数据统计管理",
                    icon: "PieChart"
                },
                children: [
                    {
                        path: "/data/empInfo",
                        name: "EmpInfo",
                        component: () => import("@views/data/empInfo/index.vue"),
                        meta: {
                            isVisible: true,
                            title: "员工信息统计",
                            icon: "DataAnalysis"
                        }
                    },
                    {
                        path: "/data/stuInfo",
                        name: "StuInfo",
                        component: () => import("@views/data/stuInfo/index.vue"),
                        meta: {
                            isVisible: true,
                            title: "学院信息统计",
                            icon: "DataLine"
                        }
                    }
                ]
            },
        ]
    },
    {
        path: "/:pathMatch(.*)*",
        redirect: "/404"
    }
]

export default routes;